<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	$item=uni_setting('pay');
	if(!$item['credit_activitys']){
		$item['credit_activitys']=array();
	}
	$return['item']=$item;
	$htmls=array(
		'type'=>'edit',
		'post'=>'set',
		'desc'=>'充值优惠',
		'edit'=>array(
			array('type'=>'array_simple','title'=>'余额充值赠送设置','name'=>'credit_activitys','fields'=>array(
				array('type'=>'string','name'=>'condition','title'=>'充值金额（元）'),
				array('type'=>'string','name'=>'money','title'=>'赠送金额（元）'),
			)),
		)
	);
	$return['htmls']=$htmls;	
	exi($return);
}
if($_RQ['op']=='set'){
	$post=get_postdata();
	uni_setting('pay',$post);
	exi('设置成功');
}